package haha;


import java.util.Random;

public class GameSucsac {
	private int mat;

	public int getMat() {
		return mat;
	}

/*	public void setMat(int mat) {
		this.mat = mat;
	} 
*/	
	public void gieo(){
		Random r=new Random();
		mat=r.nextInt(6)+1;//tu 0-6
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + mat;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		GameSucsac other = (GameSucsac) obj;
		if (mat != other.mat)
			return false;
		return true;
	}

	@Override
	public String toString() {
		String tungsucsac="";
		switch (mat) {
		case 1: tungsucsac="nhat";break;
		case 2: tungsucsac="nhi";break;
		case 3: tungsucsac="tam";break;
		case 4: tungsucsac="tu";break;
		case 5: tungsucsac="ngu";break;
		case 6: tungsucsac="luc";break;
		
		}
		return tungsucsac;
	}
	
	
}
